
#ifndef _HTTPRESPONSE_H_
#define _HTTPRESPONSE_H_	1



#include <windows.h>
#include "httpcommon.h"
#include "parser.h"


typedef	struct _HTTP_RESPONSE_PTR
{
	HTTP_TOKEN	hrp_contentLength;
} HTTP_RESPONSE_PTR;


class CHttpResponseMessage
{
public:
	CHttpResponseMessage();
	~CHttpResponseMessage();

	/* GET/SET functions */
	char	*GetResponseMessage() { return m_response; }
	int		GetResponseMessageLength() { return m_responseLen; }
	void	SetMessageStatus( BOOL status ) { m_isMessageComplete = status; }

	BOOL	MakeResponseMessage( char *frag, int fragLen );


	BOOL	isMakeMessageComplete() { return m_isMessageComplete; }

	/* utility function */

	BOOL	parseMessage();

private:
	char		*m_response;
	int			m_responseLen;

	CHttpParser	m_parser;

	BOOL		m_isMessageComplete;

	
	/* token identifier */
	HTTP_RESPONSE_PTR	m_httpResponsePtr;
};





#endif